package com.lavegue.model;

/**
 * MsgDetail entity. @author MyEclipse Persistence Tools
 */

public class MsgDetail implements java.io.Serializable, Comparable<MsgDetail> {

	// Fields

	private Integer id;
	private Msg msg;
	private Integer zhenNo;
	private Integer inter;
	private String pic;
	private String txt;
	private String music;

	// Constructors

	/** default constructor */
	public MsgDetail() {
	}

	/** minimal constructor */
	public MsgDetail(Msg msg, Integer zhenNo, Integer inter) {
		this.msg = msg;
		this.zhenNo = zhenNo;
		this.inter = inter;
	}

	/** full constructor */
	public MsgDetail(Msg msg, Integer zhenNo, Integer inter, String pic,
			String txt, String music) {
		this.msg = msg;
		this.zhenNo = zhenNo;
		this.inter = inter;
		this.pic = pic;
		this.txt = txt;
		this.music = music;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Msg getMsg() {
		return this.msg;
	}

	public void setMsg(Msg msg) {
		this.msg = msg;
	}

	public Integer getZhenNo() {
		return this.zhenNo;
	}

	public void setZhenNo(Integer zhenNo) {
		this.zhenNo = zhenNo;
	}

	public Integer getInter() {
		return this.inter;
	}

	public void setInter(Integer inter) {
		this.inter = inter;
	}

	public String getPic() {
		return this.pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public String getTxt() {
		return this.txt;
	}

	public void setTxt(String txt) {
		this.txt = txt;
	}

	public String getMusic() {
		return this.music;
	}

	public void setMusic(String music) {
		this.music = music;
	}

	
	public int compareTo(MsgDetail o) {
		if (this.zhenNo > o.getZhenNo()) {
			return 1;
		} else if (this.zhenNo == o.getZhenNo()) {
			return 0;
		} else {
			return -1;
		}
	}

}